Skip to content

PP-2: remove convert_tiffs, zarr_export, the moved-name shims and the old axis functions - #66

Merged
guijacquemet merged 4 commits into
mainfrom
claude/pp-2-removals
Nov 1, 2026
Merged

guijacquemet merged 4 commits into
mainfrom
claude/pp-2-removals

Conversation

@guijacquemet

@guijacquemet guijacquemet commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

This is PP-2 of the v0.4.0 plan (preprocessing-design-v0.4.md, revision 4, §8). It removes features and is breaking. PP-0 (#65) is merged, and main is merged into this branch (17fcb2e).

Summary

  • convert_tiffs and zarr_export are removed:
    • OME-Zarr copies in <output>/ome_zarr, OmeZarrWriter, ConversionSettings, ConversionEstimate, estimate_conversion, ome_zarr_relative_path and _CopyStaging.
    • run_experiment(convert_tiffs=, conversion=) and RunResult.converted.
    • The CLI options --convert-tiff, --chunk-size, --compression, --compression-level and --pyramid-levels.
    • The notebook's "(Optional) Image conversion" card.
    • _staged_outputs/_publish_outputs lose their copy handling.
  • Manifest: settings.convert_tiffs, settings.conversion and files[].ome_zarr_path are no longer written.
    • An older manifest that holds them is still read, and its rows are kept, since they were the TIFF's own.
    • Copies such a run left on disk are not touched.
  • free_space moves to _io, for the disk check of PP-11's OME-TIFF conversion.
  • The deprecated stand-ins are removed: _moved.py, the csv_io, dtypes, histogram, normalization, pooling and records modules, and the package __getattr__. Tests now import from morphobricks_normalization.
  • check_declared_axes and declared_axes_transposed are removed, not deprecated (audit M7): they read a Y/X swap transposed, which v0.4 forbids. Their tests are removed; the axis check covers the rules.
  • Baseline: shrinks by 14 entries; the # noqa: ANN count goes from 63 to 57.
  • Docs:
    • contract §9 (removed keys), §10 (replaced by a removal note) and §16;
    • user guide (install, step 3, CLI table, outputs, messages);
    • plan §12 Q46 (and Q45 amended);
    • AGENTS.md and README.

Review fix (ecfc5af)

AGENTS.md's decisions log (Q12, Q15, P1) and its testing note, and the plan's OME-Zarr and large-plane passages, still described the conversion and the stand-ins as current. They are now marked as history.

Notes for review

  • About 3.5k lines are removed, mostly zarr_export.py, its 1,000-line test file and the notebook card.
  • Pickles: PhysicalSizes objects pickled under the old module path morphobricks_preprocessing.zarr_export no longer unpickle. Its test was removed.
  • OME-Zarr input is unchanged: zarr_input, labels, and the unknown_scale reading.
  • Other bricks still use removed names on their main (to migrate in their v0.4 PRs; not edited here):
    • CellPatcher: check_declared_axes and declared_axes_transposed;
    • MorphoFeature: axes.check_declared_axes and declared_axes_transposed;
    • MorphoRelate: the same two, and zarr_export.OmeZarrWriter in a test;
    • fiberfeatures: the same two.

Tests

  • New file tests/test_removed_in_v040.py (25 tests): removed names and modules are gone; the run and the CLI refuse the conversion options; a v0.3 manifest with conversion keys is still read and its rows kept; free_space. On old main it fails at collection (_io does not exist).
  • Full gate as CI on ecfc5af (ruff check, ruff format --check, tools/check.py --rules, pytest with .[dev,notebook,zarr]):
    • Python 3.13 with zarr 3: 1343 passed, 1 skipped (root ignores file modes).
    • Python 3.11 with zarr 2.18: 1325 passed, 19 skipped (that root skip plus 18 OME-NGFF 0.5 tests that need zarr 3).

Generated by Claude Code

… old axis functions

Spec revision 4, section 8 PP-2. Breaking for v0.4.0.

- convert_tiffs and zarr_export are removed: OME-Zarr copies in
  <output>/ome_zarr, OmeZarrWriter, ConversionSettings, ConversionEstimate,
  estimate_conversion, ome_zarr_relative_path, _CopyStaging; also
  run_experiment(convert_tiffs=, conversion=), RunResult.converted, the CLI
  --convert-tiff/--chunk-size/--compression/--compression-level/
  --pyramid-levels, and the notebook's conversion card.
  - The manifest no longer writes settings.convert_tiffs,
    settings.conversion or files[].ome_zarr_path. An older manifest that
    holds them is still read, and their rows are kept (they were the
    TIFF's own).
  - free_space moves to _io for the disk check of the coming OME-TIFF
    conversion.
- The deprecated stand-ins of the code moved to morphobricks_normalization
  are removed: _moved, csv_io, dtypes, histogram, normalization, pooling
  and records, with the package's __getattr__. Tests import from the
  normalization brick.
- check_declared_axes and declared_axes_transposed are removed rather than
  deprecated: they read a Y/X swap transposed, which v0.4 forbids.
- The baseline shrinks (zarr_export, the conversion card and the old
  functions are gone).

Docs: contract §9/§10/§16, user guide, plan §12 Q45/Q46, AGENTS.md,
README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WX6rdMV1r5jUPUR94kxV5a
Conflicts in the docs, axes.py and the header-axes tests were resolved hunk
by hunk with this PR's removals. The review commits' other edits are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WX6rdMV1r5jUPUR94kxV5a
The baseline conflict keeps main's identical-bodies sizes of 0 and drops the entries PP-2's
removals made unnecessary (the zarr_export duplicate and the two declared-axes helpers).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WX6rdMV1r5jUPUR94kxV5a
…till describe them

AGENTS.md's decisions log (Q12, Q15, P1) and testing notes, and the plan's OME-Zarr and
large-plane passages, still described TIFF to OME-Zarr conversion and the deprecated
stand-ins as current.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WX6rdMV1r5jUPUR94kxV5a

Copy link
Copy Markdown
Contributor Author

Independent review: approved after a merge of main and one docs commit.

Checked

  • Removals are complete:
    • The removed public names are ConversionEstimate, ConversionSettings, OmeZarrWriter, estimate_conversion, ome_zarr_relative_path, check_declared_axes and declared_axes_transposed, plus the 21 moved names.
    • The removed modules are _moved, csv_io, dtypes, histogram, normalization, pooling, records and zarr_export.
    • I compared the package's __all__ and submodules on main and on this branch.
    • No code, test or notebook still refers to them, outside the removal notes and test_removed_in_v040.py.
  • run.py:
    • The non-conversion path is unchanged.
    • _publish_outputs keeps the same rollback for the table, design and manifest.
    • An old manifest's ome_zarr_path and conversion are ignored. Its rows are kept, which is right because the copies held the source values.
  • Breaking change documented: plan Q46, contract §9/§10/§16, the user guide and README.

Fixed

  • 17fcb2e merges main (PP-0). The baseline conflict keeps main's identical-bodies sizes of 0 and drops the entries this PR made unnecessary.
  • ecfc5af: AGENTS.md's decisions log (Q12, Q15, P1), its testing note, and plan.md's OME-Zarr and large-plane passages still described the conversion and the stand-ins as current. They are now marked as history.

Other bricks, origin/main, read-only. These uses of removed names must migrate:

  • CellPatcher 2c0a533:
    • src/cellpatcher/io.py:778 imports both axis functions;
    • tests/test_declared_axes.py:43,49;
    • docs in orchestration.py and types.py, and the notebook CHANGELOG.md.
  • MorphoFeature 9951a58:
    • src/morphofeature/fov_files.py:72 (axes.check_declared_axes, declared_axes_transposed);
    • docs in run_config.py:467 and README.md:147;
    • tests/test_run_config.py:324.
  • MorphoRelate ea19bb0:
    • src/morphorelate/io/tiff.py:18 (both axis functions);
    • tests/test_three_commands.py:17 (zarr_export.OmeZarrWriter);
    • docs in docs/input_contract.md, CHANGELOG.md and tests/test_io_tiff.py.
  • fiberfeatures 362f1ba:
    • src/fiberfeatures/batch.py:16-19,291,294,309 (both axis functions);
    • docs in AGENTS.md, CHANGELOG.md and tests/test_batch.py.
  • MorphoObjects, MorphoEmbed, MorphoCoverage and normalization have none.

Gate on ecfc5af: ruff check and format clean, --rules clean.

  • 3.13 with zarr 3.4.2: 1343 passed, 1 skipped (root ignores file modes).
  • 3.11 with zarr 2.18.7: 1325 passed, 19 skipped (that one plus 18 OME-NGFF 0.5 tests that need zarr 3).
  • CI is green on all 7 jobs.

Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants